﻿using System;
using UnityEngine;

// Token: 0x0200013C RID: 316
[DisallowMultipleComponent]
[AddComponentMenu("RVP/C#/Input/Mobile Input Setter", 1)]
public class MobileInput : MonoBehaviour
{
	// Token: 0x060005C3 RID: 1475 RVA: 0x0002DD40 File Offset: 0x0002BF40
	private void Start()
	{
		Screen.autorotateToPortrait = (this.screenRot == ScreenOrientation.Portrait || this.screenRot == ScreenOrientation.AutoRotation);
		Screen.autorotateToPortraitUpsideDown = (this.screenRot == ScreenOrientation.PortraitUpsideDown || this.screenRot == ScreenOrientation.AutoRotation);
		Screen.autorotateToLandscapeRight = (this.screenRot == ScreenOrientation.LandscapeRight || this.screenRot == ScreenOrientation.LandscapeLeft || this.screenRot == ScreenOrientation.AutoRotation);
		Screen.autorotateToLandscapeLeft = (this.screenRot == ScreenOrientation.LandscapeLeft || this.screenRot == ScreenOrientation.LandscapeLeft || this.screenRot == ScreenOrientation.AutoRotation);
		Screen.orientation = this.screenRot;
	}

	// Token: 0x060005C4 RID: 1476 RVA: 0x0002DDE4 File Offset: 0x0002BFE4
	public void SetAccel(float f)
	{
		this.accel = Mathf.Clamp01(f);
	}

	// Token: 0x060005C5 RID: 1477 RVA: 0x0002DDF2 File Offset: 0x0002BFF2
	public void SetBrake(float f)
	{
		this.brake = Mathf.Clamp01(f);
	}

	// Token: 0x060005C6 RID: 1478 RVA: 0x0002DE00 File Offset: 0x0002C000
	public void SetSteer(float f)
	{
		this.steer = Mathf.Clamp(f, -1f, 1f);
	}

	// Token: 0x060005C7 RID: 1479 RVA: 0x0002DE18 File Offset: 0x0002C018
	public void SetEbrake(float f)
	{
		this.ebrake = Mathf.Clamp01(f);
	}

	// Token: 0x060005C8 RID: 1480 RVA: 0x0002DE26 File Offset: 0x0002C026
	public void SetBoost(bool b)
	{
		this.boost = b;
	}

	// Token: 0x04000864 RID: 2148
	public ScreenOrientation screenRot = ScreenOrientation.LandscapeLeft;

	// Token: 0x04000865 RID: 2149
	[NonSerialized]
	public float accel;

	// Token: 0x04000866 RID: 2150
	[NonSerialized]
	public float brake;

	// Token: 0x04000867 RID: 2151
	[NonSerialized]
	public float steer;

	// Token: 0x04000868 RID: 2152
	[NonSerialized]
	public float ebrake;

	// Token: 0x04000869 RID: 2153
	[NonSerialized]
	public bool boost;
}
